<template>
<div>
<Header></Header>
    <div class="list_banner" style="background-image: url(lib/images/list_banner_3.jpg);"></div>
    <div class="hotel_list hotel_con_1 index_box_1">
        <div class="common_title">
            <p class="t_wz"><span class="name">开心玩，轻松赚：</span></p>
            <p class="wz">免费住泰国度假胜地度假村， 投资年回报高达9%</p>
        </div>
        <ul class="hotel_ul common_code_pop">
            <li v-for="rent in list">
                <a href="javascript:void(0);">
                    <div class="pt">
                        <div class="wx_con">
                            <p class="code_pt" :link="weixinPrefix+'#/hotelrent/detail/'+rent.id" ></p>
                            <p class="wx_wz">微信扫码在线下单</p>
                        </div>
                        <img width="508" :src="sftpPathPrefix + rent.photo" alt="">
                    </div>
                    <p class="wz_1"><span class="name">{{rent.title}}</span><span class="label_wz">{{rent.year}}</span></p>
                    <p class="wz_2">{{rent.subtitle}}</p>
                </a>
            </li>
        </ul>
    </div>
    <Footer></Footer>
</div>
</template>
<script>
import common from "../utils/common";
import Header from "../components/Header.vue";
import Footer from "../components/Footer.vue";
export default {
  components: {
    Header,Footer
  },
  mounted: function() {
    this.findPage(1);
  },
  methods: {
    findPage:function(pageNo){
    	var self = this;
        var url = common.getApiPrefix() + "api/portal/web/hotelrent/list/"+pageNo+"/999";
        common.doGet(url,function(data){
            self.list = data.resultList;
            self.count = data.count;
            setTimeout(function(){
			    $(".common_code_pop>li").hover(function(){
			        $(this).find(".wx_con").animate({top:"0px"},300);
			    },function(){
			        $(this).find(".wx_con").animate({top:-$(this).find(".pt").height()+"px"},300);
			    });
			    
			    qrcode(".common_code_pop .code_pt");
		    },100);
        });
    }
  },
  data: function() {
    return {
        sftpPathPrefix: common.getFtpPrefix(),
        weixinPrefix: common.getWeixinPrefix(),
        list: [],
        count:0
    };
  }
};
</script>